package com.kurumi.medical.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.kurumi.medical.datasource.TargetDataSource;
import com.kurumi.medical.mapper.PointsStandardMapper;
import com.kurumi.medical.pojo.PointsStandard;
import com.kurumi.medical.query.BasicDataQuery;
import com.kurumi.medical.service.PointsStandardService;

@Service
public class PointsStandardServiceImpl implements PointsStandardService {
	
	@Autowired
	private PointsStandardMapper pointsStandMapper;

	@Transactional
	@TargetDataSource(name="ds1")
	@Override
	public int deleteByPrimaryKey(Integer id) {
		return pointsStandMapper.deleteByPrimaryKey(id);
	}

	@Transactional
	@TargetDataSource(name="ds1")
	@Override
	public int insert(PointsStandard record) {
		return pointsStandMapper.insert(record);
	}

	@TargetDataSource(name="ds1")
	@Override
	public List<Map<String,Object>> selectByPrimaryKey(Integer id) {
		return pointsStandMapper.selectByPrimaryKey(id);
	}

	@Transactional
	@TargetDataSource(name="ds1")
	@Override
	public int updateByPrimaryKey(PointsStandard record) {
		return pointsStandMapper.updateByPrimaryKey(record);
	}

	@TargetDataSource(name="ds1")
	@Override
	public List<PointsStandard> getPointsStands(BasicDataQuery params) {
		return pointsStandMapper.getPointsStands(params);
	}

	@TargetDataSource(name="ds1")
	@Override
	public int getCountByParams(BasicDataQuery params) {
		return pointsStandMapper.getCountByParams(params);
	}

}
